package com.cw2.creatation.factory.factorymethod;

public class MainTest {
    public static void main(String[] args) {
        // 把工厂抽象化,可以把工厂再次细分化下来
        WulinSaiCarFactory saiCarFactory = new WulinSaiCarFactory();
        AbstractCar abstractCar = saiCarFactory.newCar();
        abstractCar.run();

        VanCarFactory vanCarFactory = new VanCarFactory();
        AbstractCar abstractCar1 = vanCarFactory.newCar();
        abstractCar1.run();
    }
}
